<!--
@author	Yi Bo <etng2004@gmail.com>
@version	$Id: __view_template.php 24 2007-08-29 09:14:57Z etng2004 $
@copyrithg	2006-2007 ETE.CN
@license 	PHP Version 3.0 {@link http://www.php.net/license/3_0.txt}
-->
<?php
$this->declareVars();
require_once(dirname(__FILE__) . '/_meta_client.php');
echo $this->render('header.php');
//$this->dump($this->client);
?>
<?php
$client = $this->client;
?>

<h3> <a href="<?php echo $this->base_url; ?>/view/id/<?php echo $client['id']; ?>"><?php echo $client['name']; ?></a> </h3>
<?php echo date('Y-m-d', $client['created_at']); ?>
<hr />
<div class="content">
  <!--copy the following textarea to here-->
  <div class="develop_notice1">
    <h3>View</h3>
    <textarea name="CRMLiteDevelopCodeView" rows="10" cols="50" wrap="off" onfocus="this.select();">
<table>
  <?php
        foreach ($client as $field => $value):
	?>
	<tr>
		<td>&lt;?php echo $meta['fields']['<?php echo $field; ?>'];?&gt;</td><td>&lt;?php echo $client['<?php echo $field; ?>'];?&gt;</td>
	</tr>
	        <?php
        endforeach;
	?>
</table>
</textarea>
    <h3>Meta</h3>
    <textarea name="CRMLiteDevelopCodeMeta" rows="10" cols="50" wrap="off" onfocus="this.select();">
<?php
$keys = array_keys($client);
echo "\$meta['fields'] = " . var_export(array_merge(array_combine($keys, $keys), $meta['fields']), true) . ';';
?>
</textarea>
  </div>
</div>
<a href="<?php echo $this->base_url; ?>/edit/id/<?php echo $client['id']; ?>">编辑</a> <a href="<?php echo $this->base_url; ?>/remove/id/<?php echo $client['id']; ?>">删除</a>